package org.skyer.third.gateway.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 订单回流通用业务参数
 */
@Getter
@Setter
@ToString
public class OrderBackFlowCommonDTO implements Serializable {

    @ApiModelProperty(value = "平台订单号", required = true)
    private String orderId;

    @ApiModelProperty(value = "物流公司code", required = true)
    private String companyCode;

    @ApiModelProperty(value = "物流公司名称", required = true)
    private String companyName;

    @ApiModelProperty(value = "快递单号", required = true)
    private String logisticsNo;

    @ApiModelProperty("需要发货的子订单信息列表")
    private List<Item> shippedOrderInfo;

    @ApiModelProperty(value = "发货平台类型参照 PlatformEnum", required = true)
    private Integer type;

    @ApiModelProperty(value = "发货类型 1、整单发 2、父订单发多个包裹 3、多个子订单发一个包裹", required = true)
    private Integer logisticsType;

    @ApiModelProperty(value = "发货平台token", required = true)
//    @NotNull(message = "发货平台token不能为空")
    private String token;
    /**
     * 唯品会JITX仓库code
     */
    @ApiModelProperty(value = "唯品会JITX仓库code")
    private String wphWarehouseCode;

    @ApiModelProperty(value = "用户uuid")
    private Long uuid;

    @Getter
    @Setter
    @ToString
    @ApiModel("商品信息")
    public static class Item implements Serializable {

        @ApiModelProperty("需要发货的子订单原始记录id")
        private Long analysisEcOrderGoodsOriId;

        @ApiModelProperty("需要发货的子订单id")
        private String shippedOrderId;

        @ApiModelProperty("子订单的待发货数/微信视频小号必传")
        private Integer shippedNum;

        @ApiModelProperty("子订单的重量")
        private String shippedWeight;

        @ApiModelProperty("skuId/微信视频小号/小红书拆单发货")
        private String skuId;

        @ApiModelProperty("spuId/微信视频小号")
        private String spuId;

        @ApiModelProperty("包裹id")
        private String packId;

    }

}
